home *** CD-ROM | disk | FTP | other *** search
Wrap
INI File | 1994-09-17 | 10.1 KB | 363 lines | [ TEXT/ttxt]
[Display using Monaco 9] 22 Special Routines ```````````````````` Use these routines with caution, or don’t use them! ``````````````````````````````````````````````````` The following routines should be used with caution, or not at all. The “comments or special instructions” column explains if the routine can be used in a limited way, or if a Tools Plus equivalent should be used instead. If the column is blank, the Macintosh toolbox routine should not be used at all. If Inside Macintosh states that a specific routine should not be called because it is automatically called by the system when it starts up, you need not reference that routine in this section. Some routines that are not listed here can be used, but they will require a pointer to a window. Your application can use Tools Plus’s WindowPointer routine to determine a window’s pointer. Toolbox Routine Comments or Special Instructions ``````````````` `````````````````````````````````````````````````````` AddResMenu Use AppleMenu AppendMenu Use Menu BackPat A window's background pattern should never be changed from white BringToFront CheckItem Use CheckMenu ClearMenuBar CloseWindow Use WindowClose CountMItems Use MenuItemCount or PopUpItemCount DeleteMenu Use RemoveMenu or RemovePopUp DelMenuItem Use RemoveMenu or RemovePopUp DialogSelect Modal dialogs are allowed, but a Tools Plus window is easier to use DisableItem Use EnableMenu DisposeControl Use with custom controls only DisposeMenu DisposeWindow DlgCopy DlgCut DlgDelete DlgPaste DragControl Use with custom controls only DragWindow Draw1Control Use with custom controls only DrawGrowIcon DrawMenuBar Use UpdateMenuBar EnableItem Use EnableMenu or EnablePopUp EventAvail Your application will intercept some events so that they never reach Tools Plus. Also note that under MultiFinder and System 7, this routine will switch tasks to other applications and desk accessories. Don’t use this routine unless you really know what you are doing and you thoroughly test your results. FindControl Done automatically for buttons and scroll bars FindWindow FlashMenuBar FlushEvents InitToolsPlus flushes all events when Tools Plus is initialized. You may flush mouse-down, mouse-up, key- down, key-up and auto-key events, as well as application-defined events 1 through 4. When flushing mouse-up events, you may be disrupting a drag that is already in progress. If the StillDown function returns true, a drag is in progress, and PollSystem will continue processing the drag until a mouse-up event is encountered. As a rule, don’t use this routine unless you really know what you are doing and you thoroughly test your results. FrontWindow This routine is almost useless if your application has a tool bar or floating palettes. See ToolBarNumber, FirstPaletteNumber, FirstStdWindowNumber, and WorkWindowNumber GetCRefCon Use with custom controls only GetCTitle Use with custom controls only GetCtlMax Use with custom controls only. For scroll bars, use GetScrollBarMax GetCtlMin Use with custom controls only. For scroll bars, use GetScrollBarMin GetCtlValue Use with custom controls only. For scroll bars, use GetScrollBarVal. For buttons (check boxes or radio buttons), use ButtonIsSelected GetItem Use GetMenuString GetItemCmd Use GetMenuCmd GetItemIcon Use GetMenuIcon or GetPopUpIcon GetItemMark Use GetMenuMark or GetPopUpMark GetMenu No equivalent in Tools Plus because menus can’t be defined as resources. Use Menu instead or NewPopUp. GetNewControl No equivalent in Tools Plus because buttons and scroll bars can’t be defined as resources. Use NewButton or NewScrollBar instead. Can be used for custom controls. GetNewMBar No equivalent in Tools Plus because menus can’t be defined as resources. Use Menu instead or NewPopUp. GetNewWindow No equivalent in Tools Plus because windows can’t be defined as resources. Use WindowOpen, WindowOpenRect, or ToolBarOpen instead. GetNextEvent Your application will intercept events so that they never reach Tools Plus. Also note that under MultiFinder and System 7, this routine will switch tasks to other applications and desk accessories. Don’t use this routine unless you really know what you are doing and you thoroughly test your results. GetOSEvent Your application will intercept events so that they never reach Tools Plus. Also note that under MultiFinder and System 7, this routine will switch tasks to other applications and desk accessories. As a rule, don’t use this routine unless you really know what you are doing and you thoroughly test your results. GrowWindow HideControl Use with custom controls only HideWindow Use WindowDisplay HiliteControl Use with custom controls only. For scroll bars, use EnableScrollBar. For buttons, use EnableButton. HiliteMenu Use MenuHilite HiliteWindow InitCursor Use CursorShape or ResetCursor routines instead InitDialogs InitMenus Not required in THINK Pascal InitWindows InsertMenu Use Menu or NewPopUp InsertResMenu InsMenuItem Use InsertMenuItem IsDialogEvent Modal dialogs are allowed, but a Tools Plus window is easier to use KillControls List Manager List Manager routines may be incorporated into your application to handle sophisticated lists. However, the list’s scroll bars must be flagged as “custom controls,” and your application must handle all events pertaining to the list. MenuKey MenuSelect MoveControl Use with custom controls only MovePortTo The co-ordinates may be changed temporarily, providing they are reset prior to calling any Tools Plus routine MoveWindow Use WindowMove NewControl Use with custom controls only. For scroll bars, use NewScrollBar. For buttons, use NewButton NewMenu Use Menu or NewPopUp NewWindow WindowOpen, WindowOpenRect, or ToolBarOpen NMInstall Use SetNotification and PostNotification NMRemove Executed automatically (if required) when your application is activated OpenDeskAcc PopUpMenuSelect PostEvent Do not post app4Evt (or osEvt in System 7) events. They are used by MultiFinder. They are used by MultiFinder and System 7’s Finder. SelectWindow Use ActivateWindow SendBehind SetCRefCon Use with custom controls only SetCTitle Use with custom controls only. For buttons, use ButtonTitle SetCtlMax Use with custom controls only. For scroll bars, use SetScrollBarMax SetCtlMin Use with custom controls only. For scroll bars, use SetScrollBarMin SetCtlValue Use with custom controls only. For scroll bars, use SetScrollBarVal. For buttons (check boxes or radio buttons), use SelectButton. SetCursor Use CursorShape or ResetCursor routines instead SetEventMask Upon startup, key-up events are disabled. Do not disable the following events: mouseDown, MouseUp, keyDown, autoKey, updateEvt, activateEvt, and app4Evt SetItem Use RenameItem or RenamePopUp SetItemCmd Use MenuCmd SetItemIcon Use MenuIcon or PopUpIcon SetItemMark Use MenuMark or PopUpMark SetItemStyle Use MenuStyle or PopUpStyle SetMenuBar SetOrigin The co-ordinates may be changed temporarily, providing they are reset to (0,0) prior to calling any Tools Plus routine SetResLoad Must be set to SetResLoad(true) before calling any Tools Plus routine SetWTitle Use WindowTitle ShowControl Use with custom controls only ShowHide Use WindowDisplay ShowWindow Use WindowDisplay SizeControl Use with custom controls only SizeWindow Use WindowSize SpaceExtra SpaceExtra must be set to 0, the initial value, when calling any Tools Plus routine SysBeep Use Beep (for convenience) SystemClick SystemEdit SystemEvent SystemMenu TEActive Use ActivateField TEAutoView TECalc TEClick Use ClickInField TECopy TECut TEDeactivate Use DeactivateField TEDelete TEDispose Use DeleteField TEFromScrap TEGetText Use GetFieldString TEIdle Called in PollSystem TEInit TEInsert TEKey TENew Use NewField TEPaste TEPinScroll TEScroll TESelect TESelView TESetJust TESetText TEToScrap TEUpdate TrackBox TrackControl Done automatically for buttons and scroll bars TrackGoAway UnloadSeg Do not unload the segments containing Tools Plus’s libraries UpdtControl WaitNextEvent Your application will intercept events so that they never reach Tools Plus. Also note that under MultiFinder and System 7, this routine will switch tasks to other applications and desk accessories. Don’t use this routine unless you really know what you are doing and you thoroughly test your results. ZoomWindow